<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
		<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
		<title>老师端查看互评的详情view</title>
		<link rel="stylesheet" type="text/css" href="../../css/api.css"/>
		<link rel="stylesheet" href="../../css/weui.min.css" />
		<link rel="stylesheet" href="../../css/mui.min.css" />
		<link rel="stylesheet" href="../../css/base.css"/>
		<style type="text/css" media="screen">
			html, body {
				background-color: #f3f5f7;
			}
			.top-hand-div-style {
				text-align: center;
				margin-top: 80px;
				background-color: #FFFFFF;
				border: 2px solid #FFFFFF;
				border-radius: 6px;
				margin-right: 10px;
				margin-left: 10px;
				padding-top: 20px;
				padding-bottom: 20px;
			}
			.div-full-screen {
				position: absolute;
				left: 0;
				right: 0;
				top: 0;
				bottom: 50px;
			}
			.div-full-screen2 {
				position: absolute;
				left: 0;
				right: 0;
				top: 280px;
				bottom: 50px;
			}
			.top-hand-img-style {
				width: 120px;
				height: 120px;
				border-radius: 60px;
			}
			.top-hand-span-style {
				display: block;
				/*padding-bottom: 20px;*/
			}
			.bottom-btn-div {
				position: fixed;
				bottom: 0px;
				width: 100%;
				background-color: #18b4ed;
				color: #FFFFFF;
				line-height: 40px;
				text-align: center;
			}
			.colorblue {
				color: #18b4ed;
			}
			#middleId {
				margin-top: 10px;
			}
		</style>
	</head>
	<body>
		<div id="titelid" hidden="hidden">
			<div class="base_style_color base_title_Immerse" id='BarAppearance' ></div>
			<div class="base_navigation_bar base_style_color base_navigation_item_bar base_title_position" >
				<a class="base_left_item" href="#" onclick="backClick()"> <img class="base_back_icon" src="../../image/icon_jiantou.png" alt=""> </a>
				<span id="newsTitle">互评</span>
				<a class="base_right_item nav-item" id="wancheng"> </a>
			</div>
		</div>
		<!--<div class="top-hand-div-style" id="topHandId">
		<img src="../../image/icon_head_ask_class.png"  class="top-hand-img-style" id="headImgId"/>
		<span class="base_content_font base_black_grey top-hand-span-style" id="headNameId" > 选择人员</span>
		</div>
		<div class="top-hand-div-style " id="middleId">
		<span class="base_title_font base_black_grey top-hand-span-style" id="headNameId" > <em   id="yNmuId"  class="colorblue">22</em>人已评</span>
		<span class="base_title_font base_black_grey top-hand-span-style" id="headNameId" ><em   id="wNmuId"  class="colorblue">22</em>人未评</span>
		<span class="base_title_font base_black_grey top-hand-span-style" id="headNameId" > 平均得分:<em   id="averageId"  class="colorblue">55</em>分</span>
		</div>
		<div class="bottom-btn-div base_title_font" onclick="loaddata()">结束评分</div>-->
		<div class="bottom-btn-div base_title_font" onclick="enddata()">
			结束评分
		</div>
	</body>
	<script type="text/javascript" src="../../script/api.js"></script>
	<script type="text/javascript" src="../../script/jquery.min.js"></script>
	<script type="text/javascript" src="../../script/common.js"></script>
	<script type="text/javascript" src="../../script/MD5.js"></script>
	<script type="text/javascript" src="../../script/timeStampTool.js"></script>
	<script type="text/javascript" src="../../script/requestTool.js"></script>
	<script type="text/javascript" src="TeacherMutualRatingJs.js"></script>
	<script type="text/javascript" src="../../script/push.js"></script>
	<script type="text/javascript">
		var currentStudents;
		var param = '';
		var type = 0;
		//0:未开始  1：开始  2结束
		apiready = function() {
			param = api.pageParam;
			setscreen();
			notice();
			determineType();
		};
		function notice() {
			api.addEventListener({
				name : 'pushMessage_classroomMessage'
			}, function(ret, err) {
				//			alert(JSON.stringify( ret.value));
				if (MUTUAL_START_TYPE == ret.value.type && $api.getStorage('cfnetppjxid') == ret.value.jid && 2 == ret.value.status) {
					$(".bottom-btn-div").hide();
				}
			})
		}

		function determineType() {
			var status = param.status;
			if (status == 2) {//结束
				$(".bottom-btn-div").hide();
				$("#titelid").show();
			}
		}

		//设置屏幕状态
		function setscreen() {
			var y = 44 + 22 + 10;
			var h = api.winHeight - y - 50;
			api.openFrame({
				name : 'TeacherMutualRatingViewFrame',
				url : 'TeacherMutualRatingViewFrame.html',
				pageParam : api.pageParam,
				rect : {
					x : 0,
					y : y,
					w : 'auto',
					h : h
				}
			});
		}

		function enddata() {
			showProgress();
			var params = {
				jid : $api.getStorage('cfnetppjxid'),
				uid : $api.getStorage('cfnetppuid'),
				iid : api.pageParam.id,
				tid : 7,
				action : 'end',
			}
			//				alert(JSON.stringify(params));
			cfnetppPOST(url_actionDosign, params, true, function(data, status) {
				//				alert(JSON.stringify(data));
				SendBusinessOperationsLogNotifi('老师端互评结束', '213', params, params, '', data, '老师端互评结束接口', '213-01')
				api.hideProgress();
				if (status == 'success') {
					if (data.code == 200) {
						api.sendEvent({
							name : 'endMutualRating'
						});
						$(".bottom-btn-div").hide();
					}
				}
			})
		}

		function backClick() {
			sendBuriedNotifi('1', '老师端互评结果页', '213')
			api.closeWin({
				url : 'TeacherMutualRatingWind'
			});
		}

		function sendBuriedNotifi(busionessid, pagetype, pagetypeid) {
			var userinfo = {
				uid : $api.getStorage('cfnetppuid'),
				jid : $api.getStorage('cfnetppjxid'),
				uname : $api.getStorage('cfnetppusername'),
			}
			var data = {
				busionessid : busionessid,
				pagetype : pagetype,
				pagetypeid : pagetypeid,
				sourceurl : api.pageParam.sourceurl,
				sourcetitle : api.pageParam.sourcetitle,
				accesspageurl : window.location.pathname,
				accesspagetitle : document.title,
				userinfo : userinfo
			}
			SendBehaviorTrajectoriesNotifi_Study(data);
		}
	</script>
</html>